package com.xdcplus.web.common.enums;

public enum ToolInfoUnitTypeEnum {
    // 数据操作错误定义
    MAIN("MAIN", "主设备"),
    SUB("SUB", "子设备"),
    ;

    private String code;

    private String msg;

    public static String getMsg(String code) {
        for (ToolInfoUnitTypeEnum ele : values()) {
            if(ele.getCode().equals(code)) {return ele.getMsg();}
        }
        return null;
    }

    ToolInfoUnitTypeEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

}
